<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../WEB-INF/omsTemplate.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://java.sun.com/jsf/html">

    <ui:define name="content">
        <h2>Ordenes</h2>
        
        <p:dataTable value="#{ordenesController.findOrdersByStateAndProcessState}" paginator="true" var="orden">
            
            <p:column headerText="Identificador">
                <h:outputText value="#{orden.orderid}"/>
            </p:column>
            
            <p:column headerText="Comentarios">
                <h:outputText value="#{orden.comments}"/>
            </p:column>
            
            <p:column headerText="Nombre cliente">
                <h:outputText value="#{orden.custid.fname}"/>
            </p:column>
            
            <p:column headerText="Email cliente">
                <h:outputText value="#{orden.custid.email}"/>
            </p:column>
            
            <p:column headerText="Precio">
                <h:outputText value="#{orden.price}"/>
            </p:column>
            
            <p:column headerText="Viajeros">
                <h:outputText value="#{orden.numTravelers}"/>
            </p:column>
        </p:dataTable>
    </ui:define>

</ui:composition>
